package com.infore.operation.utils;

import java.util.Comparator;
import java.util.Map;

/**
 * Created by Administrator on 2017/9/22.
 */
public class ComparatorMap implements Comparator {
    @Override
    public int compare(Object arg0, Object arg1) {
        Map<String, Object> map1 = (Map<String, Object>)arg0;
        Map<String, Object> map2 = (Map<String, Object>)arg1;
        Double map1String = Double.parseDouble( map1.get("percent").toString());
        Double map2String = Double.parseDouble( map2.get("percent").toString());
        return map1String<map2String?1:0;
    }
}
